import time
from .celery import app
import random


@app.task
def seckill_task():
    time.sleep(6)  # 模拟秒杀需要3s
    res = random.choice([True, False])
    if res:
        return '秒杀成功'
    else:
        return '很遗憾，您没有秒到'
